From: Matthieu Gallien Date: Fri, 6 Dec 2024 16:20:30 +0000 (+0100) Subject: set the proper file type for directory junction entries X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~30^2^2~204^2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=2ae4d56ba0f63825e3f424e1c00ffdca556aca60;p=nextcloud-desktop.git set the proper file type for directory junction entries Close #7157 Signed-off-by: Matthieu Gallien --- diff --git a/src/csync/vio/csync_vio_local_win.cpp b/src/csync/vio/csync_vio_local_win.cpp index 76aa4a45a..da677c692 100644 --- a/src/csync/vio/csync_vio_local_win.cpp +++ b/src/csync/vio/csync_vio_local_win.cpp @@ -161,7 +161,13 @@ std::unique_ptr csync_vio_local_readdir(csync_vio_handle_t *h !isDirectory) { file_stat->type = ItemTypeSkip; } else if (isDirectory) { - file_stat->type = ItemTypeDirectory; + if (handle->ffd.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT && + (handle->ffd.dwReserved0 == IO_REPARSE_TAG_SYMLINK || + handle->ffd.dwReserved0 == IO_REPARSE_TAG_MOUNT_POINT)) { + file_stat->type = ItemTypeSoftLink; + } else { + file_stat->type = ItemTypeDirectory; + } } else { file_stat->type = ItemTypeFile; }